package com.bjb.vr.common.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * DB WorkerID Assigner for UID Generator
 *
 * @TableName WORKER_NODE
 */
@TableName(value = "WORKER_NODE")
@Data
public class WorkerNode extends BaseModel implements Serializable {
    /**
     * auto increment id
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    /**
     * host name
     */
    @TableField(value = "HOST_NAME")
    private String hostName;

    /**
     * port
     */
    @TableField(value = "PORT")
    private String port;

    /**
     * node type: ACTUAL or CONTAINER
     */
    @TableField(value = "TYPE")
    private Integer type;

    /**
     * launch date
     */
    @TableField(value = "LAUNCH_DATE")
    private LocalDate launchDate;

    /**
     * modified time
     */
    @TableField(value = "MODIFIED")
    private LocalDateTime modified;

    /**
     * created time
     */
    @TableField(value = "CREATED")
    private LocalDateTime created;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}